package org.vacoor.nothing.shop.entity;

import org.hibernate.validator.constraints.URL;
import org.vacoor.nothing.web.Nls;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;


/**
 * @desc 商品品牌
 * @Table T_BRAND
 */
public class Brand extends SortEntity {
    /**
     * @desc 品牌名称
     */
    @NotNull
    @Size(min = 1, max = 255)
    @Digits(integer = 100, fraction = 0)
    @Nls("100101")
    private String name;
    /**
     * @desc 品牌别名
     */
    @Size(max = 255)
    @Nls("100103")
    private String alias;
    /**
     * @desc 品牌链接
     */
    @URL
    @Size(min = 0, max = 255)
    @Nls("100104")
    private String url;
    /**
     * @desc 品牌LOGO
     */
    @Size(max = 255)
    @Pattern(regexp = "\\d+")
    @Nls("100102")
    private String logo;
    /**
     * @desc 品牌描述
     */
    @Size(min = 0, max = 200000)
    @Nls("100105")
    private String desc;
    /**
     * @desc 是否启用
     */
    @Nls("100106")
    private Boolean enabled = Boolean.FALSE;
    private Boolean deleted = Boolean.FALSE;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }
}
